package com.nts.visionworks.core.mediainfo;

import java.util.HashMap;
import java.util.Map;

public enum SupportContentsType
{
	IMAGE(0),
	VIDEO(1),
	AUDIO(2);
	
	public final int value;
	
	private static final Map<Integer, SupportContentsType> _map = new HashMap<Integer, SupportContentsType>();
	
	static
	{
		for (SupportContentsType item : SupportContentsType.values())
		{
			_map.put(item.value, item);
		}
	}
	
	private SupportContentsType(int value)
	{
		this.value = value;
	}
	
	public static SupportContentsType cast(String value)
	{
		return SupportContentsType.valueOf(value.toUpperCase());
	}
	
	public static SupportContentsType convert(int value)
	{
		return _map.get(value);
	}
}